package com.niit.drugsmanager.repository;

import com.niit.drugsmanager.entity.User;
import groovyjarjarantlr4.v4.runtime.misc.NotNull;
import lombok.NonNull;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface UserRepository extends JpaRepository<User, Long> {
    User findUserByEmailAndPassword(String email, String password);
    Page<User> findUserByUsernameContainingOrEmailContaining(String name, String email, Pageable pageable);
    @NonNull
    Page<User> findAll(@NonNull Pageable pageable);
    Integer removeUserById(Long id);
}
